<script setup lang="ts">
// 函数类型  void 没有返回值的时候

function add(a: string): void {
  console.log(11, a);
}

add('a');

type MyFn2 = (a: string) => number;

const fn2: MyFn2 = (): number => {
  return 1;
};

const c = fn2('aaa');
console.log(c);
</script>

<template>123</template>
